import { createRouter, createWebHistory } from 'vue-router'
import useLogin from '../views/useLogin.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: '/',
      component: useLogin
    },
    {
      path: '/login',
      name: 'login',
      component: useLogin
    },
    {
      path: '/home',
      name: 'home',
      component: () =>   import('../views/HomeView.vue')
    },
    {
      path: '/online',
      name: 'online',
      component: () => import('../views/OnlineView.vue'),
      children: [
        {
          path: '',
          name: 'default',
          component: () => import('../views/OnStepDefault.vue')
        },
        {
          path: 'online1',
          name: 'online1',
          component: () => import('../views/OnStep1.vue')
        },
        {
          path: 'online2',
          name: 'online2',
          component: () => import('../views/OnStep2.vue')
        },
        {
          path: 'online3',
          name: 'online3',
          component: () => import('../views/OnStep3.vue')
        }
      ]
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    }
  ]
})

export default router
